package com.xcity.pomelo.response;

import java.util.Collections;
import java.util.List;

import com.xcity.db.entity.Player;
import com.xcity.game.item.ItemInfo;
import com.xcity.game.peakroad.model.response.Floor;
import com.xcity.game.peakroad.model.response.RewardFloorSub;
import com.xcity.game.peakroad.template.PeakRoadTemplate;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class PeakRoadGetRewardResponse extends Response {
	
	public int index; // 宝箱索引
	public byte state; // 领取状态 @see RewardFloorSub#STATE_XX
	@Deprecated
	public List<ItemInfo> items = Collections.emptyList(); // 获得的奖励物品
	public Floor next; // 下一层信息
	
	public PeakRoadGetRewardResponse(int serial, Player player, int index, PeakRoadTemplate nextTemplate) {
		super(serial);
		this.index = index;
		this.state = RewardFloorSub.STATE_REWARDED;
		if (nextTemplate != null) {
			this.next = new Floor(player, nextTemplate);
		}
	}

}
